<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-html" prefix="html"%>
<%@ taglib uri="/struts-bean" prefix="bean"%>
<%@ taglib uri="/struts-logic" prefix="logic"%>
<%@ taglib uri="/terasoluna-struts" prefix="ts"%>
<%@ taglib uri="/terasoluna" prefix="t"%>
<%@ taglib uri="/terasoluna-library" prefix="tl"%>
<%@ taglib uri="/self" prefix="self"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String imagePath = basePath + "admin/images";
%>
<html>
<head>
<title></title>
<link href="<%=request.getContextPath()%>/admin/css/tcmsystem.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="javascript/jquery-1.7.1.js"></script>
<script type="text/javascript" src="javascript/tcmsystem.js"></script>
</head>
<body>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td height="30" background="<%=imagePath%>/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="12" height="30"><img src="<%=imagePath%>/tab_03.gif" width="12" height="30" /></td>
			<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				<td width="46%" valign="middle">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="5%">
						<div align="center">
							<img src="<%=imagePath%>/tb.gif" width="16" height="16" />
						</div>
						</td>
						<td width="95%" class="STYLE1"><span class="STYLE3">你当前的位置</span>：[系统管理]-[角色管理]</td>
					</tr>
				</table>
				</td>
				<td width="54%">
				<table border="0" align="right" cellpadding="0" cellspacing="0">
					<tr>
						<td width="60">
						<table width="90%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td class="STYLE1"><div align="center">
										<html:link action="/gotoAddRole.do" target="work">
											<img src="<%=imagePath%>/22.gif" width="14" height="14" />
										</html:link>
									</div></td>
								<td class="STYLE1">
								<div align="center">
									<html:link module="/admin" action="/gotoAddRole.do" target="work">新增</html:link>
								</div>
								</td>
							</tr>
						</table>
						</td>
						<td width="52">
						<table width="88%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td class="STYLE1"><div align="center">
										<a href="#" onclick="deleteMany('/deleteRole.do', 'subBox')"><img src="<%=imagePath%>/11.gif" width="14" height="14" /></a>
									</div></td>
								<td class="STYLE1">
									<div align="center">
										<a href="#" onclick="deleteMany('/deleteRole.do', 'subBox')">删除</a>
									</div>
								</td>
							</tr>
						</table>
						</td>
					</tr>
					</table></td>
					</tr>
				</table></td>
				<td width="16"><img src="<%=imagePath%>/tab_07.gif" width="16" height="30" /></td>
			</tr>
		</table></td>
		</tr>
		<tr>
		<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="8" background="<%=imagePath%>/tab_12.gif">&nbsp;</td>
				<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
						<html:form action="/roleList.do" method="post" styleId="queryForm">
							<tr>
								<td width="100%" colspan="5" height="50" bgcolor="#FFFFFF">
									<div align="left">
										<span class="STYLE1">角色名称</span>
										<html:text property="name"></html:text>
										<html:hidden property="pageIndex" value="1" />
										<html:submit>检索</html:submit>
									</div>
								</td>
							</tr>
						</html:form>
						<tr>
							<td width="5%" height="22" background="<%=imagePath%>/title_bg.gif" bgcolor="#FFFFFF"><div align="center">
									<input type="checkbox" id="mainBox" name="mainBox" onclick="mainCheck('mainBox', 'subBox')" />
								</div></td>
							<td width="5%" height="22" background="<%=imagePath%>/title_bg.gif" bgcolor="#FFFFFF"><div align="center">
									<span class="STYLE1">序号</span>
								</div>
							</td>
								
							<td width="10%" height="22" background="<%=imagePath%>/title_bg.gif" bgcolor="#FFFFFF"><div align="center">
									<span class="STYLE1">角色名称</span>
								</div>
							</td>
							
							<td width="10%" height="22" background="<%=imagePath%>/title_bg.gif" bgcolor="#FFFFFF"><div align="center">
									<span class="STYLE1">角色说明</span>
								</div>
							</td>
							
							<td width="10%" height="22" background="<%=imagePath%>/title_bg.gif" bgcolor="#FFFFFF" class="STYLE1">
								<div align="center">基本操作</div>
							</td>
						</tr>
						<logic:iterate id="role" name="roleList" scope="request" indexId="number">
							<tr>
								<td height="20" bgcolor="#FFFFFF"><div align="center">
										<input type="checkbox" id="subBox" name="subBox" onclick="subCheck('mainBox', 'subBox')" value='<bean:write name="role" property="id"/>' />
									</div></td>
								<td height="20" bgcolor="#FFFFFF">
									<div align="center" class="STYLE1">
										<bean:define id="pageStartRow" name="pageBean" property="pageStartRow" type="java.lang.Integer"></bean:define>
										<div align="center"><%=pageStartRow + number%></div>
									</div>
								</td>

								<td height="20" bgcolor="#FFFFFF">
									<div align="center">
										<span class="STYLE1"><bean:write name="role" property="name" /></span>
									</div>
								</td>
								<td height="20" bgcolor="#FFFFFF">
								<div align="center">
									<span class="STYLE1"><bean:write name="role" property="remark" /></span>
								</div>
								</td>

								<td height="20" bgcolor="#FFFFFF">
									<div align="center">
										<span class="STYLE4">
										<html:link action="/gotoSetRole.do" paramId="id" paramName="role" paramProperty="id" target="work">
										权限设置</html:link>&nbsp;
										<html:link action="/editRole.do" paramId="id" paramName="role" paramProperty="id" target="work">
										<img src="<%=imagePath%>/edt.gif" width="16" height="16" />编辑
										</html:link>&nbsp;&nbsp;
										<a href="#" onclick="deleteSubmit('/deleteRole.do', '<bean:write name="role" property="id"/>')">
										<img src="<%=imagePath%>/del.gif" width="16" height="16" onclick="deleteSubmit()" />删除
										</a>
										</span>
									</div>
								</td>
							</tr>
						</logic:iterate>
					</table>
				</td>
				<td width="8" background="<%=imagePath%>/tab_15.gif">&nbsp;</td>
			</tr>
		</table></td>
		</tr>
		<html:form action="/roleList.do" method="post" styleId="pageForm">
			<tr>
				<td height="35" background="<%=imagePath%>/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="35"><img src="<%=imagePath%>/tab_18.gif" width="12" height="35" /></td>
							<td><self:pager formId="pageForm" indexProperty="pageIndex" pageBeanName="pageBean" scope="request" /> <html:hidden property="pageIndex" /></td>
							<td width="16"><img src="<%=imagePath%>/tab_20.gif" width="16" height="35" /></td>
						</tr>
					</table></td>
			</tr>
		</html:form>
	</table>
</body>
</html>
